<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="icon" href="public/Images/favicon32.ico" type="image/x-icon" />
        <title>蘑菇街-我的买手街</title>
        <link href="public/Css/site.css" rel="stylesheet" type="text/css" />
        <script src="public/Js/jquery-1.7.2.min.js"></script>
        <script src="public/Js/home_index.js"></script>
    </head>
    <body style="height:auto;">	
        <!--header begin-->
        <include  file="Public/header" />
        <!--header end-->
        
        <!--top begin-->
        
        <div class="top">
	<div class="top_logo">
    	<a href="{:U('Index/index')}"><img src="public/Images/shop-logo.jpg" title="蘑菇街" /></a>
    </div>
    <div class="top_search">
    	<div class="form">
        	<form action="{:U('Search/index')}" method="get" id="search_form">
            	<select name="search">
                	<option <?php if(isset($search)){ echo $search ? 'selected' : '';} ?> value="1">搜商品</option>
                    <option <?php if(isset($search)){ echo  $search ? '' : 'selected';} ?> value="0">搜店铺</option>
                </select>
                <script>
                    var searchUrl="{:U('Search/searchUrl')}";
                    
                    //ajax提交搜索商品和店铺
                    $(function(){
                        $('#top_sinput').keyup(function(){
                            //判断用户是搜商品还是搜店铺 1为商品 0为店铺
                            var search = $('select[name=search]').val();
                            var keyword = $(this).val();
                            if(keyword!=''){
                                $.ajax({
                                    type : "post",
                                    data : {"search":search,'keyword':keyword},
                                    url : searchUrl,
                                    dataType : "json",
                                    success : function(data){
                                        if(data!='no'){
                                            var s='';
                                            for (var i = 0;i<data.length;i++) {
                                                s +='<li class="searchli">';
                                                s +='<a class="title" title="'+data[i].name+'" href="javascript:;">'+data[i].name+'</a>';
                                                if(data[i]['tags']){
                                                    for(var j=0;j<data[i]['tags'].length;j++){
                                                        s +='<span class="prop">'+data[i]['tags'][j]+'</span>';
                                                        if(j>1){
                                                            break;
                                                        }
                                                    }
                                                    
                                                    // s +='<span class="prop">'+data[i]['tags'][1]+'</span>';
                                                    // s +='<span class="prop">'+data[i]['tags'][2]+'</span>';
                                                }
                                                
                                                s +='</li>';
                                            };
                                            $('.top_search_hint').show();
                                            $('.search_tip').html(s);

                                        }else{
                                            $('.top_search_hint').show();
                                            $('.search_tip').html('<p class="tip_none">暂无相关热门关键词</p>');
                                        }
                                    }
                                });
                            }
                        });
                        
                        //单击事件
                        $('.searchli').live('click',function(){
                            $('#top_sinput').val($(this).children('.title').html());
                            $('#search_form').submit();
                        });
                        $('.search_a').live('click',function(){
                            $('#top_sinput').val($(this).html());
                            $('#search_form').submit();
                        });
                        $('.searchli').live('mouseover',function(){
                            $(this).addClass('checked');
                            $(this).siblings().removeClass('checked');
                        });
                        $('.top').click(function(){
                            $('.top_search_hint').hide();
                        });
                    });
                </script>
                <input class="top_sinput" type="text" id="top_sinput" name="keyword" autocomplete="off"  value="" /><input class="topsub" type="submit" value="" />
            </form>
        </div>
        <div class="top_search_hint" >
            <div class="search_tip_box fl">
                <div class="mr300 tip_wrap">
                    <ul class="search_tip">
                        
                    </ul>
                </div>
            </div>
        </div>
        <ul>
    		<li><a class="search_a" href="javascript:;">呢外套</a></li>
            <li><a class="search_a" href="javascript:;">风衣</a></li>
            <li><a class="search_a" href="javascript:;">羽绒服</a></li>
            <li><a class="search_a" href="javascript:;">运动鞋</a></li>
            <li><a class="search_a" href="javascript:;">卫衣</a></li>
            <li><a class="search_a" href="javascript:;">雪地靴</a></li>
            <li><a class="search_a" href="javascript:;">家居服</a></li>
            <li><a class="search_a" href="javascript:;">新款女包</a></li>
            <li><a class="search_a" href="javascript:;">毛衣</a></li>
        </ul>
    </div>
</div>
<!--top end -->

        <!--top end-->
		<!--nav begin-->
        <div class="nav">
        	<div class="m_nav">
      			<ul class="nav_ul">
                	<li class="all_goods">全部商品</li>
                    <?php //foreach ($goodslist as $k => $v){ ?>
                        <?php 
                        //echo '<li><a href="">'.$v[]['gf_name'].'</a></li>';
                         ?>
                    <?php //} ?>
                </ul>
        	</div>
        </div>
        <!--nav end-->
        <!--main begin-->
        <div class="main"> 
            <!--top_main begin-->
			<div class="top_main">
            	<!--left begin-->
            	<div class="left_topmain">
                	<ul class="navlist" id="navlist">
                	
                        <?php foreach ($goodslist as $k => $v){ ?>
                        	<li class="left_nav">
                            	<dl>
                                	<dt><a href="{:U('goodslist',array('cid'=>$v[0]['pid'],'pid'=>0))}">{$k}</a></dt>
                                    <?php //foreach ($goodslist as $k => $v){ ?>
                                       <?php //echo '<dd><li><a href="">'.$v.'</a></li></dd>'; ?>
                                    <?php //} ?> 
                                </dl>
                            </li>
                            <div class="none_nav">
                                <ul>
                                    <foreach name="v" item="v1" >
                                	   <li><a href="{:U('goodslist',array('cid'=>$v1['id'],'pid'=>$v1['pid']))}">{$v1.channelname}</a></li>
                                    </foreach> 
                                </ul>
                            </div>
                        <?php } ?>
                        
                    </ul>
                </div>
                <!--left end-->
                <!--m begin-->
                <div class="m_topmain" id="as">
                    <foreach name="adImages" item="v">
                        <a href="{$v.url}"><img src="__ROOT__/Uploads/ad/{$v.img}" /></a>
                    </foreach>
                    <div class="left" id="l"></div>
                    <div class="right" id="r"></div>
                    <ul>
                    	<li class="point"></li>
                      	<li></li>
                        <li></li>
                        <li></li>
                        <li></li>
                        <li></li>
                    </ul>
                </div>
                <!--m begin-->
                <!--right begin-->
                <div class="right_topmain">
                	<ul>
                        <foreach name="rightAd" item="v">
                    	   <li><a href="{$v.url}"><img src="__ROOT__/Uploads/ad/{$v.img}" /></a></li>
                        </foreach>
                    </ul>
                </div>
                <!--right end-->
            </div>       
            <!--top_main end-->
            <!--m1 begin-->
            <!--<div class="groom">
            	<div class="groom_time">
                	<p>
                    	
                    </p>
                    <a href=""><img src="public/ER/m1_1.jpg" width="223" height="" /></a>
                </div>
                <div class="groom_tuan">
                	<a href=""><img src="public/ER/m1_2.png" /></a>
                    <a href=""><img src="public/ER/m1_3.png"  width="235" /></a>
                </div>
                <div class="groom_cheap">
                	<a href=""><img src="public/ER/m1_4.jpg" /></a>
                    <a href=""><img src="public/ER/m1_5.jpg" /></a>
                </div>

            </div>-->
            <!--m1 end-->
            <div class="m_title">
            	<div class="side_m_title">
                </div>
                <div class="mm_title">
                	<h3>品牌馆</h3>
                </div>
                <div class="side_m_title">
                </div>
            </div>
            <!--brand begin-->
            <div class="brand">
            	<div class="brand_list">
                	<div class="brand_list_head">
                        <foreach name="bindLAd" item="v">
                    	   <a href="{$v.url}"><img src="__ROOT__/Uploads/ad/{$v.img}"  /></a>
                        </foreach>
                    </div>
                     <ul>
                        <foreach name="brandAd" item="v">
                           <li><a href="{$v.url}"><img src="__ROOT__/Uploads/ad/{$v.img}" width="111" height="60"  /></a></li>
                        </foreach>
                        <li><a href=""><img src="public/ER/brand/brand-3.jpg" /></a></li>
                        <li><a href=""><img src="public/ER/brand/brand-4.jpg" /></a></li>
                        <li><a href=""><img src="public/ER/brand/brand-5.jpg" /></a></li>
                        <li><a href=""><img src="public/ER/brand/brand-6.jpg" /></a></li>
                        <li><a href=""><img src="public/ER/brand/brand-7.jpg" /></a></li>
                        <li><a href=""><img src="public/ER/brand/brand-8.jpg" /></a></li>
                    </ul>	
            	</div>
                <div class="brand_hot">
                    <foreach name="bindBig" item="v">
                	   <a href="{$v.url}"><img src="__ROOT__/Uploads/ad/{$v.img}" /></a>
                    </foreach>
                </div>
                <div class="goods_list">
                    <foreach name="goodsAd" item="v">
                        <a href="{$v.url}">
                            <img src="__ROOT__/Uploads/ad/{$v.img}" width="170"/>
                            <span class="brand_goods_name">{$v.name}</span>
                        </a>
                    </foreach>
                      
                </div>
            </div>
            <!--brand end-->
            <div class="m_title">
            	<div class="side_m_title">
                </div>
                <div class="mm_title">
                	<h3>享瘦</h3>
                </div>
                <div class="side_m_title">
                </div>
            </div>
             <!--brand2 begin-->
            <div class="brand">
            	<div class="brand_list">
                	<div class="brand_list_head">
                    	<img src="public/ER/xs/head.jpg" width="183" height="213" />
                    </div>
                     <ul>
                        <li><a href=""><img src="public/ER/xs/barand1.jpg" /></a></li>
                        <li><a href=""><img src="public/ER/xs/barand2.jpg" /></a></li>
                        <li><a href=""><img src="public/ER/xs/barand3.jpg" /></a></li>
                        <li><a href=""><img src="public/ER/xs/barand4.jpg" /></a></li>
                        <li><a href=""><img src="public/ER/xs/barand5.jpg" /></a></li>
                        <li><a href=""><img src="public/ER/xs/barand6.jpg" /></a></li>
                        <li><a href=""><img src="public/ER/xs/barand7.jpg" /></a></li>
                        <li><a href=""><img src="public/ER/xs/barand8.jpg" /></a></li>
                    </ul>	
            	</div>
                <div class="brand_hot">
                	<a href=""><img src="public/ER/xs/hot_305x500.jpg" /></a>
                </div>
                <div class="goods_list">
                    <a href="">
                        <img src="public/ER/xs/goods1_300x300.jpg" width="170"/>
                        <span class="brand_goods_name">韩版套装</span>
                    </a>
                    <a href="">
                        <img src="public/ER/xs/goods2_300x300.jpg" width="170"/>
                        <span class="brand_goods_name">显瘦裙子</span>
                    </a>
                    <a href="">
                        <img src="public/ER/xs/goods3_300x300.jpg" width="170"/>
                        <span class="brand_goods_name">棉衣棉服</span>
                    </a>
                    <a href="">
                        <img src="public/ER/xs/goods4_300x300.jpg" width="170"/>
                        <span class="brand_goods_name">大码毛衣</span>
                    </a>
                    <a href="">
                        <img src="public/ER/xs/goods5_300x300.jpg" width="170"/>
                        <span class="brand_goods_name">大码卫衣</span>
                    </a>
                    <a href="">
                        <img src="public/ER/xs/goods6_300x300.jpg" width="170"/>
                        <span class="brand_goods_name">毛呢外套</span>
                    </a>
                      
                </div>
            </div>
            <!--brand2 end-->
            
        </div>
        <!--main end-->
        <!--右侧固定栏-->
        <include  file="Public/right_nav" />
        <!--右侧固定栏结束-->

        <!--滚动条下拉显示的搜索框-->
        <div class="hide_search">
        	<div class="m_hide_search">
        		<div class="hide_logo">
                	<a href=""><img src="__ROOT__/Uploads/{$system.nav_logo}" /></a>
                </div>
                <div class="none_form">
                	<form action="{:U('Search/index')}" method="get">
                    	<select name="search">
                        	<option <?php if(isset($search)){ echo $search ? 'selected' : '';} ?> value="1">搜商品</option>
                            <option <?php if(isset($search)){ echo  $search ? '' : 'selected';} ?> value="0">搜店铺</option>
                        </select>
                        <input class="none_input" type="text" name="keyword" value="" />
                        <input class="nonesub" type="submit" value="" />
                    </form>
                </div>
            </div>
        </div>
        <!--隐藏的搜索框结束-->

        <!-- 主体内容开始 -->
		

        <!-- 主体内容结束 -->

        <!-- 底部和友情链接开始 -->
        <include  file="Public/bottom" />
        <!-- 底部和友情链接结束 -->
    </body>
</html>
